package com.doyens.controller;

import com.doyens.domain.Admin;
import com.doyens.result.Result;
import com.doyens.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin")
@CrossOrigin
public class AdminController {
    @Autowired
    private AdminService adminService;
     @PostMapping("/login")
    public Result login(@RequestBody Admin admin){
          return   adminService.loginList(admin);
    }

}
